      SUBROUTINE SYSCHECK(KPLANE,IOKPLANE, KORIGIN,IOKORIGIN)
C
C THIS SUBROUTINE CHECKS THE VALIDITY OF THE ORIENTATION AND
C ORIGIN FLAGS USED FOR SPECIFYING COORDINATE SYSTEMS WITHIN TOSS.
C SEE CTPAK SUBROUTINE FOR A LIST OF THE COORDINATE SYSTEMS AVAILABLE.
C
C VARIABLE DIM TYPE I/O DESCRIPTION
C -------- --- ---- --- -----------
C
C KPLANE    1   I*4  I  FLAG INDICATING THE COORDINATE SYSTEM'S
C                       ORIENTATION. VALID RANGE IS 1-14.
C
C IOKPLANE  1   I*4  O  FLAG INDICATING THE VALIDITY OF THE KPLANE VALUE
C
C                       = 0, VALUE IS BAD.
C                       = 1, VALUE IS OK.
C
C KORIGIN   1   I*4  I  FLAG INDICATING THE COORDINATE SYSTEM'S
C                       ORIGIN. VALID RANGE IS 1-4.
C
C IOKORIGIN 1   I*4  O  FLAG INDICATING THE VALIDITY OF THE KORIGIN
C                       VALUE
C
C                       = 0, VALUE IS BAD.
C                       = 1, VALUE IS OK.
C
C***********************************************************************
C
C BY C PETRUZZO, GSFC/742. 8/85
C        MODIFIED.....
C
C***********************************************************************
C
      LOGICAL OKPLANE,OKORIGIN
C
C CHECK PLANE FLAG VALIDITY
C
      OKPLANE =  1.LE.KPLANE   .AND.  KPLANE.LE.14
      IOKPLANE = 1
      IF(.NOT.OKPLANE)  IOKPLANE = 0
C
C CHECK ORIGIN FLAG VALIDITY
C
      OKORIGIN = 1.LE.KORIGIN  .AND.  KORIGIN.LE.4
      IOKORIGIN = 1
      IF(.NOT.OKORIGIN) IOKORIGIN = 0
C
      RETURN
      END
